\hypertarget{classSprite}{
\section{Sprite Class Reference}
\label{classSprite}\index{Sprite@{Sprite}}
}


{\ttfamily \#include $<$Sprite.h$>$}\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct {\bfseries SprAlpha}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classSprite_acde1b178d58809eccf9fd3791e9fcedf}{
{\bfseries Sprite} (string file)}
\label{classSprite_acde1b178d58809eccf9fd3791e9fcedf}

\item 
\hypertarget{classSprite_aeb66724513cb22636e1de4c3d409205a}{
int {\bfseries GetImageHeight} ()}
\label{classSprite_aeb66724513cb22636e1de4c3d409205a}

\item 
\hypertarget{classSprite_a1924333fc0272c4d565b75b665f2ba88}{
int {\bfseries GetImageWidth} ()}
\label{classSprite_a1924333fc0272c4d565b75b665f2ba88}

\item 
\hypertarget{classSprite_aa52fe643ed7c103b5c43295dcb24fe4e}{
string {\bfseries GetName} ()}
\label{classSprite_aa52fe643ed7c103b5c43295dcb24fe4e}

\item 
\hypertarget{classSprite_a9fca75610e94f0eedaeeea8c78379805}{
bool {\bfseries error} ()}
\label{classSprite_a9fca75610e94f0eedaeeea8c78379805}

\item 
\hypertarget{classSprite_a0f77680543c850cb6715238704fdd342}{
GLuint {\bfseries GetImageHandle} ()}
\label{classSprite_a0f77680543c850cb6715238704fdd342}

\item 
\hypertarget{classSprite_a053572baa76a5ba91ddd47787961786f}{
pAnimation {\bfseries GetAnimation} (string anim)}
\label{classSprite_a053572baa76a5ba91ddd47787961786f}

\item 
\hypertarget{classSprite_aa16f9f37eb312dd70cabcdea97b45369}{
uint {\bfseries GetMaxFrames} (string anim)}
\label{classSprite_aa16f9f37eb312dd70cabcdea97b45369}

\item 
\hypertarget{classSprite_ae952e5d3bbd4c562d8d31770f88b3016}{
\hyperlink{structFrame}{Frame} {\bfseries GetFrame} (string anim, uint frame)}
\label{classSprite_ae952e5d3bbd4c562d8d31770f88b3016}

\item 
\hypertarget{classSprite_a8af82c925f613b6d904142d5d27d7861}{
\hyperlink{structFrame}{Frame} {\bfseries SetFrameData} (int tl\_\-x, int tl\_\-y, int br\_\-x, int br\_\-y)}
\label{classSprite_a8af82c925f613b6d904142d5d27d7861}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classSprite_a8d2e21d5c186e5b9731269f1bd806456}{
void {\bfseries CreateDefaultAnimation} ()}
\label{classSprite_a8d2e21d5c186e5b9731269f1bd806456}

\item 
\hypertarget{classSprite_a8630e5d4d5bf06e6b65d403d18b4556d}{
bool {\bfseries LoadImageProperties} (TiXmlElement $\ast$root)}
\label{classSprite_a8630e5d4d5bf06e6b65d403d18b4556d}

\item 
\hypertarget{classSprite_aa395c53be0556401f5b843a3be9622b1}{
bool {\bfseries LoadAnimations} (TiXmlElement $\ast$root)}
\label{classSprite_aa395c53be0556401f5b843a3be9622b1}

\item 
\hypertarget{classSprite_a6cd6d1d91b460173fa5eb378a7b4924d}{
bool {\bfseries LoadImageData} (TiXmlElement $\ast$root)}
\label{classSprite_a6cd6d1d91b460173fa5eb378a7b4924d}

\item 
\hypertarget{classSprite_ac90c5c9c81695477b00980f3f753db6e}{
bool {\bfseries LoadShaderProgram} (TiXmlElement $\ast$root)}
\label{classSprite_ac90c5c9c81695477b00980f3f753db6e}

\item 
\hypertarget{classSprite_a49a141d864a017fdbc258ae8e214f071}{
void {\bfseries LoadAnimationFrame} (TiXmlElement $\ast$frame\_\-element, pAnimation anim)}
\label{classSprite_a49a141d864a017fdbc258ae8e214f071}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classSprite_a166409bbd17355e157618ec02441dab8}{
string \hyperlink{classSprite_a166409bbd17355e157618ec02441dab8}{name}}
\label{classSprite_a166409bbd17355e157618ec02441dab8}

\begin{DoxyCompactList}\small\item\em Tells the \hyperlink{classSpriteManager}{SpriteManager} what its name is when it is created. \item\end{DoxyCompactList}\item 
\hypertarget{classSprite_a61966212e1c8c4e49bffdff3b4e7325d}{
int {\bfseries image\_\-width}}
\label{classSprite_a61966212e1c8c4e49bffdff3b4e7325d}

\item 
\hypertarget{classSprite_a74f10073c5be4526a26d979f64123692}{
int {\bfseries image\_\-height}}
\label{classSprite_a74f10073c5be4526a26d979f64123692}

\item 
\hypertarget{classSprite_aee58d1a3893ec116bf0bb9090d3f62af}{
bool {\bfseries error\_\-flag}}
\label{classSprite_aee58d1a3893ec116bf0bb9090d3f62af}

\item 
\hypertarget{classSprite_a4a2a2209a899b95cbbacaebbb25f1f77}{
SprAlpha {\bfseries alpha\_\-color}}
\label{classSprite_a4a2a2209a899b95cbbacaebbb25f1f77}

\item 
\hypertarget{classSprite_aca94fcbf259307af0f7a8670f8ff7227}{
GLuint \hyperlink{classSprite_aca94fcbf259307af0f7a8670f8ff7227}{image\_\-handle}}
\label{classSprite_aca94fcbf259307af0f7a8670f8ff7227}

\begin{DoxyCompactList}\small\item\em Handle to the image stored in memory. \item\end{DoxyCompactList}\item 
\hypertarget{classSprite_a407a4d08962a8ddae1b865763be32d8e}{
\hyperlink{classMob2DFx}{Mob2DFx} \hyperlink{classSprite_a407a4d08962a8ddae1b865763be32d8e}{m\_\-shader\_\-program}}
\label{classSprite_a407a4d08962a8ddae1b865763be32d8e}

\begin{DoxyCompactList}\small\item\em Shader that the sprite runs. \item\end{DoxyCompactList}\item 
\hypertarget{classSprite_ab49f99655675110dc96aee742f03bc48}{
std::map$<$ string, pAnimation $>$ {\bfseries animations}}
\label{classSprite_ab49f99655675110dc96aee742f03bc48}

\end{DoxyCompactItemize}
\subsection*{Friends}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classSprite_a8062666e3cdb41d93575a5739308bb29}{
class \hyperlink{classSprite_a8062666e3cdb41d93575a5739308bb29}{mob2d\_\-node}}
\label{classSprite_a8062666e3cdb41d93575a5739308bb29}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
The \hyperlink{classSprite}{Sprite} class is a structure that holds all the data being rendered. The structure of the \hyperlink{classSprite}{Sprite} class and its associated classes \hyperlink{classAnimation}{Animation} and the \hyperlink{structFrame}{Frame} struct lead to a very flexible overall structure that allow for pretty much any kind of spritesheet layout to be loaded.

Also transient, if you're reading this, you and your XML abstraction idea can jump off a cliff. 

The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
/home/orm/Projects/Mob2D/libMob2D/src/Sprite.h\item 
/home/orm/Projects/Mob2D/libMob2D/src/Sprite.cpp\end{DoxyCompactItemize}
